home *** CD-ROM | disk | FTP | other *** search
- /* Join ends of arc using getarccoords */
- #include <graphics.h>
-
- main()
- {
- int graphdriver = DETECT, graphmode;
- struct arccoordstype arc_ends;
-
- /* Initialize the graphics system */
- initgraph(&graphdriver, &graphmode, "c:\\turboc");
-
- /* Draw a 60 degree arc with radius of 100 */
- arc( 150, 120, 0, 59, 100);
-
- /* Get the coordinates of the end points of the
- * arc and connect ends with a line
- */
- getarccoords(&arc_ends);
- line( arc_ends.xstart, arc_ends.ystart, arc_ends.xend, arc_ends.yend );
-
- /* Wait until user hits a key, then exit */
- getch();
- closegraph();
- }